package org.example.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.mapper.LeaveApplicationMapper;
import org.example.entity.LeaveApplication;
import org.example.service.LeaveApplicationService;

/**
* @Author: 鸢一折纸
* @Email: 3498881048@qq.com
* @Date: 2025/09/08 8:32
* @Description: ${Description}
**/
    
    
@Service
public class LeaveApplicationServiceImpl extends ServiceImpl<LeaveApplicationMapper, LeaveApplication> implements LeaveApplicationService{
    @Override
    public Page<LeaveApplication> findLeaveApplication(Page<LeaveApplication> page, Integer userId, String leaveType, String attendanceCycle, String applicationDate) {
        List<LeaveApplication> leaveApplications = baseMapper.findLeaveApplication(page, userId, leaveType, attendanceCycle, applicationDate);
        return page.setRecords(leaveApplications);
    }

    @Override
    public List<String> findAllAnnual(String leaveType, Integer userId) {
        return baseMapper.findAllAnnual(leaveType, userId);
    }
}
